//
//  CustomUIWebViewController.swift
//  MyLottery
//
//  Created by wujunjie on 2018/7/19.
//  Copyright © 2018年 wujunjie. All rights reserved.
//

import UIKit
import WebViewJavascriptBridge
class CustomUIWebViewController: UIViewController {
    lazy var webView : UIWebView = {
        let webView = UIWebView()
        return webView
    }()
    lazy var bridge :WebViewJavascriptBridge = {
        let bridge = WebViewJavascriptBridge(forWebView: self.webView)
        bridge?.setWebViewDelegate(self)
        bridge?.registerHandler("setSid", handler: { (data,responseCallBack ) in
            //获取 sid
            let setSid = data
            
        })
        return bridge!
    }()
    override func viewDidLoad() {
        super.viewDidLoad()
      
        // Do any additional setup after loading the view.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
}
